#ifndef PLAYER_H
#define PLAYER_H

//#include <Ogre.h>
//#include "btBulletDynamicsCommon.h"

#include "Weapon.h"

namespace first{

	#define MAX_LIFE 100
	#define MAX_ARMOR 100

	class Vector3{
	  public:
		double x, y, z;
		Vector3(){x=0.0; y=0.0; z=0.0;};
		Vector3(double x, double y, double z){
			this->x = x;
			this->y = y;
			this->z = z;
		};
		// We need internal promotion from other vectors
//		Vector3(const Ogre::Vector3 &);
//		Vector3(const btVector3 &);
		// Copy contructor
		Vector3(const Vector3 &);
		Vector3 &operator=(const Vector3 &);
	};


	class Player{
	  protected:
		Vector3 pos;
		unsigned life;
		unsigned armor;
		first::Weapon * currentWeapon;
		first::Weapon * secondWeapon;
	  public:
		Player(Vector3 initialPos){
		    pos = initialPos; life=MAX_LIFE; armor=0;
		    currentWeapon = secondWeapon = 0;
        };
        Vector3 getPosition() const{
            return pos;
        };
        unsigned getLife() const{
            return life;
        };
        unsigned getArmor() const{
            return armor;
        };
        void setLife(unsigned newLife);
        void setArmor(unsigned newArmor);
        void setCurrentWeapon(first::Weapon * weapon){
            currentWeapon = weapon;
        }
        void setSecondWeapon(first::Weapon * weapon){
            secondWeapon = weapon;
        }
        int getCurrentWeapongBulletsLeft(){
            return currentWeapon->getBulletsLeft();
        }
        void shoot(){
            if(currentWeapon)
                currentWeapon->shoot();
        }
	};

}

#endif // PLAYER_H
